package edu.sandau.b23015110.repository;

import edu.sandau.b23015110.model.Customer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CustomerRepository extends JpaRepository<Customer,String> {
    List<Customer> findByName(String name);

//    List<Customer> findByNameAndAge(String name, Integer age);
//    List<Customer> findByNameOrAge(String name, Integer age);

    
    @Query(nativeQuery = true, value = "select * from customer where name = ?1")
    List<Customer>findByNativeQuery(String name);


}
